﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Business.Common;
using WF_Business;
using Business.Admin;

public partial class MyWindow_TzggInfoDetail : PageBase
{
    public string wznr,title, time, fujian, strPublier;
    public int loadcount;
    private void Page_Load(object sender, System.EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
            if (Request.QueryString["id"] != null && loadcount == 0)
            {
                InitContent(Request.QueryString["id"]);
                loadcount++;
            }
        }
    }

    private void InitContent(string id)
    {
        ClsInfoManage imTemp = new ClsInfoManage();
        DataTable dtSource = imTemp.GetAllInfo("", id);

        for (int i = 0; i < dtSource.Rows.Count; i++)
        {
            DataRow dr = dtSource.Rows[i];
            wznr = Server.UrlDecode(dr["wznr"].ToString());
            title = dr["bt"].ToString();
            time = dr["fbsj"].ToString();
            strPublier = dr["zz"].ToString();
        }
    }

    protected string GetTitleHtml()
    {
        string html = "";
        if (!string.IsNullOrEmpty(title))
        {
            if (title.Length <= 31)
            {
                html = "<div style=\" width:838px; height:98px; \">  <div style=\" width:838px; height:30px; font-size:25px; font-weight:bold; padding-top:15px; text-align:center;\"> " + title + "</div> <div style=\" width:808px; height:28px; font-size:12px; text-align:right; padding-top:20px; padding-right:30px;\">时间：" + time + "  发布人：" + strPublier + " </div> </div>";
            }
            else if (title.Length > 31)
            {
                html = "<div style=\" width:838px; height:100px; \">  <div style=\" width:838px; height:30px;font-size:25px; font-weight:bold; padding-top:15px; text-align:center;\"> " + title.Substring(0, 31) + "</div> <div style=\" width:838px; height:30px; font-size:25px; font-weight:bold; padding-top:15px; text-align:center;\"> " + title.Substring(31) + "</div></div><div style=\" width:808px; height:28px; font-size:12px; text-align:right; padding-top:20px; padding-right:30px;\">时间：" + time + "  发布人：" + strPublier + " </div>";
            }
        }

        return html;
    }
}
